﻿#region 信息

// Copyright©2014 Rex Rao all rights reserved.
// File name : Mojito\Mojito.Data\DishesConfiguration.cs
// Author : Sohobloo
// Create time : 2014/08/19 10:22
// Update time : 2014/08/19 11:22

#endregion

namespace Mojito.Data.Configuration
{
    internal sealed partial class DishConfiguration
    {
        protected override void ConfigurateExtension()
        {
            Property(d => d.DishName).IsRequired().HasMaxLength(50);
            HasOptional(d => d.Category).WithMany(dc => dc.Dishes).HasForeignKey(d => d.CategoryId);
        }
    }
}